package com.dreamwhale.machinery.goods.service;

import com.dreamwhale.machinery.goods.entity.MachineBuy;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 二手机械购买 服务类
 * </p>
 *
 * @author Author
 * @since 2020-05-28
 */
public interface MachineBuyService extends IService<MachineBuy> {

    /**
     * 发布找机械
     *
     * @param machineBuy
     * @return
     */
    int insertMachineBuys(MachineBuy machineBuy);

    /**
     * 查询找机械
     *
     * @param userId
     * @return
     */
    List<MachineBuy> selectMachineBuyMap(Integer userId);

    /**
     * 查询找机械
     *
     * @param
     * @return
     */
    List<MachineBuy> selectMachineBuys(Integer infoId);

    /**
     * 查询找机械详情
     *
     * @param infoId
     * @return
     */
    MachineBuy selectMachineBuyByTypeId(Integer infoId);

    /**
     * 首页-找机械
     *
     * @param type
     * @param types
     * @param brandId
     * @param typeId
     * @return
     */
    List<MachineBuy> selectMachineBuyHome(Integer type, Integer types, Integer brandId, Integer typeId, String title);
}
